Repository navigation
Clarify multipart transport read sizes - #411
Draft
lexingtonhibiki wants to merge 1 commit into
Draft
lexingtonhibiki wants to merge 1 commit into
lexingtonhibiki wants to merge 1 commit into
Conversation
Document transport-owned read sizes instead of a fixed httplib\nlimit and an outdated encoder option proposal. Link the current\nconnection APIs without adding runtime behavior.\n\nCloses requests#368
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #368. This is the documentation-only update invited in #368 (comment).
Replace the outdated
MultipartEncoderwarning thathttplibalways reads 8192 bytes and the old request for feedback on an encoder option. The new note explains that the HTTP transport's version and configuration determine the requested read size, links the Python and urllib3 connection APIs, and makes clear that the encoder does not configure those connections. It does not substitute another fixed default or add a new setting.The only other change is the
AUTHORS.rstentry required by the contribution guide.Validation
http.client.HTTPConnectionandurllib3.connection.HTTPConnection, a real encoder, and a fake socket sink: each default plus explicit 4096/32768 read sizes. Every requested size matched the connection setting, and every reconstructed multipart body matched the complete encoder output. No HTTP request was sent to a server.get_html_theme_pathdeprecation warning. Checked the rendered upload page and both new links. These builds are not warning-free or offline.git diff --checkpasses.Prepared with AI assistance and independently reviewed by an AI agent. The focused checks ran on Python 3.12.14 / urllib3 2.8.0; they are not a full test suite, Requests Session integration test, multi-version test matrix, or performance benchmark.